timers: set the deadline more accurately
authorRoss Lagerwall <ross.lagerwall@citrix.com>
Wed, 28 May 2014 08:07:50 +0000 (10:07 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 28 May 2014 08:07:50 +0000 (10:07 +0200)
commit054b6dfb61eab00d86ddd5d0ac508f5302da0d52
treeddf6aa9f6ac5027f0cc65e6e30ef6b98d99864f2
parent84c4a1f62b0505026e9846bf707ba3de15109834
timers: set the deadline more accurately

Program the timer to the deadline of the closest timer if it is further
than 50us ahead, otherwise set it 50us ahead.  This way a single event
fires on time rather than 50us late (as it would have previously) while
still preventing too many timer wakeups in the case of having many
timers scheduled close together.

(where 50us is the timer_slop)

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
xen/common/timer.c